package id.apps.surabayacityguide;

import roboguice.inject.InjectView;

import com.actionbarsherlock.view.Menu;
import com.github.rtyley.android.sherlock.roboguice.activity.RoboSherlockActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.AdapterView.OnItemClickListener;

public class LvKulinerActivity extends RoboSherlockActivity implements OnItemClickListener
{
	// Deklarasi widget
	private @InjectView(R.id.lv_tempatkuliner)
	ListView			lv_tempatkuliner;

	// global variable
	private String[]	list_item	=
									{
			"Ayam", "Sate", "Bubur"
									};

	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_lv_kuliner);
		setItemToListview();

		lv_tempatkuliner.setOnItemClickListener(this);
	}

	/*
	 * set adapter untuk listview
	 */
	private void setItemToListview()
	{
		ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, list_item);
		lv_tempatkuliner.setAdapter(adapter);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu)
	{
		// TODO Auto-generated method stub
		return super.onCreateOptionsMenu(menu);
	}

	@Override
	public void onItemClick(AdapterView<?> parent, View view, int position, long id)
	{
		// TODO Auto-generated method stub

	}

}
